<?php
/**
 * User: b179a9
 * Date: 9/28/11
 * Time: 6:20 PM
 */

class App_Form_Rubric_Form extends Zend_Form
{

    function init()
    {
        $this->setMethod('post');
        $this->setAction('');

        $id = new Zend_Form_Element_Hidden('id');
        $this->addElement($id);

        $name = new Zend_Form_Element_Text('name');
        $name->setLabel('Name:')
                ->setRequired()
                ->addValidators(array(new Zend_Validate_StringLength(1, 255)));
        $this->addElement($name);

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Save');

        $this->addElement($submit);
        $this->addElement('hash', 'csrf', array(
                                               'ignore' => true,
                                          ));
    }

}
